<?php
class ParamsField{

	protected $_fieldParams;
	protected $_libs;
	
	public function __construct($fieldParams)
	{
		$this->_fieldParams = $fieldParams;
	}
	
	protected function GetParam($key)
	{
		return $this->HasParam($key) ? $this->_fieldParams[$key] : null;
	}
	
	protected function HasParam($key)
	{
		return array_key_exists($key, $this->_fieldParams);
	}
	
	public function PreparePostData($fieldPostData)
	{
		return $fieldPostData;
	}
	
	protected function Libs()
	{
    	if (!$this->_libs)	$this->_libs = SysLoader::GetLibCollection(); 
    	return $this->_libs; 
	}	

	public function PrepareOutData($fieldData)
	{
        return $fieldData;
	}	
	
    protected function ClearText($text)
    {
        return $this->Libs()->minifier->MinifyHTML($this->Libs()->purifier->purifyHTML($text));
    }		

}